<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/views/robot2/header.jsp" %>
<title>Insert title here</title>
</head>
<body>
 <select name="Capital" id="Capital" onclick="go()" class="text_input text_input01">
 	<option selected="selected" class="selected" >请选择...</option>
 </select>
                  
<select name="city" id="city" class="text_input text_input01">
 	<option selected="selected" class="selected" >请选择...</option>
</select>
					
 </body>

<script type="text/javascript">
$(function() {
	var capital=[
		"北京","上海","天津","重庆", "河北","山西","内蒙古","辽宁", "吉林","黑龙江","江苏","浙江", "安徽","福建","江西","山东"
		, "河南","湖北","湖南","广东","广西","海南","四川","贵州","云南","西藏","陕西" , "甘肃", "青海","宁夏","新疆", "台湾"];
       
    var city=[
              ["东城","西城","崇文","宣武","朝阳","丰台","石景山","海淀","门头沟","房山","通州","顺义","昌平","大兴","平谷","怀柔","密云","延庆"],
              ["黄浦","卢湾","徐汇","长宁","静安","普陀","闸北","虹口","杨浦","闵行","宝山","嘉定","浦东","金山","松江","青浦","南汇","奉贤","崇明"],
              ["和平","东丽","河东","西青","河西","津南","南开","北辰","河北","武清","红挢","塘沽","汉沽","大港","宁河","静海","宝坻","蓟县"],
              ["万州","涪陵","渝中","大渡口","江北","沙坪坝","九龙坡","南岸","北碚","万盛","双挢","渝北","巴南","黔江","长寿","綦江","潼南","铜梁","大足","荣昌","壁山","梁平","城口","丰都","垫江","武隆","忠县","开县","云阳","奉节","巫山","巫溪","石柱","秀山","酉阳","彭水","江津","合川","永川","南川"],
              ["石家庄","唐山","秦皇岛","邯郸","邢台","保定","张家口","承德","沧州","廊坊","衡水"],
              ["太原","大同","阳泉","长治","晋城","朔州","晋中","运城","忻州","临汾","吕梁"],
              ["呼和浩特","包头","乌海","赤峰","通辽","鄂尔多斯","呼伦贝尔","巴彦淖尔","乌兰察布","兴安","锡林郭勒","阿拉善"],
              ["沈阳","大连","鞍山","抚顺","本溪","丹东","锦州","营口","阜新","辽阳","盘锦","铁岭","朝阳","葫芦岛"],
              ["长春","吉林","四平","辽源","通化","白山","松原","白城","延边"],
              ["哈尔滨","齐齐哈尔","鸡西","鹤岗","双鸭山","大庆","伊春","佳木斯","七台河","牡丹江","黑河","绥化","大兴安岭"],
              ["南京","苏州","扬州","无锡","徐州","常州","南通","连云港","淮安","盐城","镇江","泰州","宿迁"],
              ["杭州","宁波","温州","嘉兴","湖州","绍兴","金华","衢州","舟山","台州","丽水"],
              ["合肥","芜湖","蚌埠","淮南","马鞍山","淮北","铜陵","安庆","黄山","滁州","阜阳","宿州","巢湖","六安","亳州","池州","宣城"],
              ["福州","宁德","南平","厦门","莆田","三明","泉州","漳州"],
              ["南昌","上饶","萍乡","九江","景德镇","新余","鹰潭","赣州","吉安","宜春","抚州"],
              ["济南","青岛","淄博","枣庄","东营","烟台","潍坊","威海","济宁","泰安","日照","莱芜","临沂","德州","聊城","滨州","菏泽"],
              ["郑州","开封","洛阳","平顶山","焦作","鹤壁","新乡","安阳","濮阳","漯河","许昌","三门峡","南阳","商丘","信阳","周口","驻马店"],
              ["武汉","十堰","襄樊","鄂州","黄石","荆州","宜昌","荆门","孝感","黄冈","咸宁","随州","恩施"],
              ["长沙","株洲","湘潭","岳阳","邵阳","常德","衡阳","张家界","益阳","郴州","永州","怀化","娄底","湘西"],
              ["广州","清远","潮州","东莞","珠海","深圳","汕头","韶关","佛山","江门","湛江","茂名","肇庆","惠州","梅州","汕尾","阳江","河源","中山","揭阳","云浮"],
              ["南宁","柳州","桂林","梧州","北海","防城港","钦州","贵港","玉林","百色","贺州","河池","来宾","崇左"],
              ["海口","三亚"],
              ["成都","自贡","攀枝花","泸州","德阳","绵阳","广元","遂宁","内江","乐山","南充","宜宾","广安","达州","眉山","雅安","巴中","资阳","阿坝","甘孜","凉山"],
              ["贵阳","六盘水","遵义","安顺","铜仁","毕节","黔西南","黔东南","黔南"],
              ["昆明","曲靖","玉溪","保山","昭通","丽江","普洱","临沧","文山","红河","西双版纳","楚雄","大理","德宏","怒江","迪庆"],
              ["拉萨","昌都","山南","日喀则","那曲","阿里","林芝"],
              ["西安","铜川","宝鸡","咸阳","渭南","延安","汉中","榆林","安康","商洛"],
              ["兰州","白银","定西","敦煌","嘉峪关","金昌","天水","武威","张掖","平凉","酒泉","庆阳","临夏","陇南","甘南"],
              ["西宁","海东","海北","黄南","海南","果洛","玉树","海西"],
              ["银川","石嘴山","吴忠","固原","中卫"],
              ["乌鲁木齐","克拉玛依","吐鲁番","哈密","和田","阿克苏","喀什","克孜勒苏柯尔克孜","巴音郭楞蒙古","昌吉","博尔塔拉蒙古","伊犁哈萨克","阿勒泰"],
              ["台北","高雄","基隆","台中","台南","新竹","嘉义"]
              ];
   
   function go(){
	   alert(13);
	   for (var int = 0; int < capital.length; int++) {
			$("#Capital").append("<option>"+capital[int]+"</option>");
		}
	   
	    var val = $("select option:selected").index()-1;
	    	
	    $("#city").empty();
	    for (var int = 0; int < city[val].length; int++) {
	    		$("#city").append("<option>"+city[val][int]+"</option>");
			}
	    }  
		 
});
					
</script>
</html>
